DateTime.Now.StringMonth([Culture])

.StringMonth([Culture]) property converts the month portion of the DateTime object into a string and returns it. If the optional Culture parameter is filled in, the string will be for the language and culture specified. If this is left blank, .StringMonth([Culture]) will use your server's culture setting.

Applies To

Properties and Methods

None

Available

The .StringMonth([Culture]) method is available in:

  • 15.03.117
  • 15.04.111
  • 15.05.116
  • 16.00.146
  • 16.01.098
  • 16.02.124
  • 16.03.067
  • 16.04.089
  • 16.05.102
  • 16.06.039
  • 16.07.028
  • 17.00.009
  • All newer builds

Type

String

Syntax

DateTime.Now.StringMonth([Culture]);

Parameters

Parameter

Required

Description

Culture

No

A string that represents the language and country to set the culture. The format is ll-CC, where ll represents the language and CC represents the Country.

A list of available cultures can be found here.

Example

var lcDay = DateTime.Today.StringMonth();

var lcDayFR = DateTime.Today.StringMonth('fr-FR');

 

Event.Form.MessageBox('Default (en-US): ' + lcDay +

'\nFrench (fr-FR): ' + lcDayFR);

 

/* Expected Prompt response:

Default (en-US): October

French (fr-FR): octobre

*/